﻿// *************************************************************************************************
// Project: RealSense.Light.Core
// Namespace: RealSense.Light.Core
// File: SpeechSynthesizerValidation.cs  Author: Peter O'Hanlon
// Copyright © Peter O'Hanlon 2014-2015
// Date: 2015/1/7 17:58
// *************************************************************************************************
using RealSense.Light.Contracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealSense.Light.Core
{
  public class SpeechSynthesizerValidation : ISpeechSynthesizerValidation
  {
    private IRangeValidation rangeValidation;

    public SpeechSynthesizerValidation(IRangeValidation rangeVal)
    {
      rangeValidation = rangeVal;
    }

    public bool IsValidVolume(int volume)
    {
      return rangeValidation.CheckRange(0, 100, volume);
    }

    public bool IsValidPitch(int pitch)
    {
      return rangeValidation.CheckRange(50, 200, pitch);
    }

    public bool IsValidSpeechRate(int rate)
    {
      return rangeValidation.CheckRange(50, 400, rate);
    }
  }
}
